package design.pattern.proxy;

/**
 * 真实主题  干活的类
 */
public class DBQuery implements IDBQuery{

	public DBQuery(){
		try {
			Thread.sleep(1000); //可能包含数据库连接等耗时操作

		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
	@Override
	public String request() throws InterruptedException {
		Thread.sleep(1000);
		return "request string 真实主题";
	}
}
